package com.chag.app.biz.dao.gen;

import java.util.List;
import org.apache.ibatis.annotations.Delete;
import org.apache.ibatis.annotations.Insert;
import org.apache.ibatis.annotations.Param;
import org.apache.ibatis.annotations.ResultMap;
import org.apache.ibatis.annotations.Select;
import org.apache.ibatis.annotations.Update;

public interface JobCatMapper {
    int countByExample(JobCatCriteria example);

    int deleteByExample(JobCatCriteria example);

    @Delete({
        "delete from JOB_CAT",
        "where JOB_CAT_ID = #{jobCatId,jdbcType=INTEGER}"
    })
    int deleteByPrimaryKey(Integer jobCatId);

    @Insert({
        "insert into JOB_CAT (JOB_CAT_ID, NAME, ",
        "REMARK)",
        "values (#{jobCatId,jdbcType=INTEGER}, #{name,jdbcType=VARCHAR}, ",
        "#{remark,jdbcType=VARCHAR})"
    })
    int insert(JobCat record);

    int insertSelective(JobCat record);

    List<JobCat> selectByExample(JobCatCriteria example);

    @Select({
        "select",
        "JOB_CAT_ID, NAME, REMARK",
        "from JOB_CAT",
        "where JOB_CAT_ID = #{jobCatId,jdbcType=INTEGER}"
    })
    @ResultMap("BaseResultMap")
    JobCat selectByPrimaryKey(Integer jobCatId);

    int updateByExampleSelective(@Param("record") JobCat record, @Param("example") JobCatCriteria example);

    int updateByExample(@Param("record") JobCat record, @Param("example") JobCatCriteria example);

    int updateByPrimaryKeySelective(JobCat record);

    @Update({
        "update JOB_CAT",
        "set NAME = #{name,jdbcType=VARCHAR},",
          "REMARK = #{remark,jdbcType=VARCHAR}",
        "where JOB_CAT_ID = #{jobCatId,jdbcType=INTEGER}"
    })
    int updateByPrimaryKey(JobCat record);
}